﻿using SUNRPA.CONTROLS.IMPL.domain.flowRunningVar;
using System.Collections.Concurrent;
using System.ComponentModel;

namespace SUNRPA.CONTROLS.IMPL.domain.flowItemParam {
    
    [Serializable]
    public class BaseParam:BaseDomain {
        public delegate void ActionDelegate(FlowItem item, ConcurrentDictionary<string, ConcurrentDictionary<string, RPAVariableDefineWrapper>> globleData);
        [NonSerialized] 
        public ActionDelegate? actionDelegate;
        [NonSerialized] 
        public System.Windows.Controls.Control? delegateObj;
        public string? delegateType;
        public bool hasDelegate = false;

        //0:终止，1：忽略，2：重试
        private int exceptionHandler = 0;

        public string OutPut = "";

        public int ExceptionHandler {
            get => exceptionHandler;
            set {
                exceptionHandler = value;
                NotifyPropertyChanged("ExceptionHandler");
            }
        }

        public virtual void SetLatestVarName(ConcurrentDictionary<string, ConcurrentDictionary<string, RPAVariableDefineWrapper>> globleData) { }
    }
}
